<script setup>
defineProps({
  gameRequire: Array
})
</script>

<template>
  <div class="game-require">
    <div class="container">
      <h2 class="os-require">系统需求</h2>
      <div class="content">
        <div class="item" v-for="item in gameRequire" :key="item">
          <div class="title">{{ item.type === 0 ? '最低配置' : '推荐配置' }}</div>
          <div class="os">
            <span class="desc">操作系统:</span><span>{{item.os}}</span>
          </div>
          <div class="cpu">
            <span class="desc">CPU:</span><span>{{item.cpu}}</span>
          </div>
          <div class="ram">
            <span class="desc">内存:</span><span>{{item.ram}}</span>
          </div>
          <div class="gpu">
            <span class="desc">显卡:</span><span>{{item.gpu}}</span>
          </div>
          <div class="dx">
            <span class="desc">DirectX版本:</span><span>{{item.dx}}</span>
          </div>
          <div class="size">
            <span class="desc">游戏大小:</span><span>{{item.size}}</span>
          </div>
        </div>
      </div>
    </div>
  </div>
</template>

<style scoped lang="scss">
.game-require {
  .container {
    margin-top: 40px;
    margin-bottom: 50px;
    width: 940px;
    .os-require {
      color: #ccc;
      position: relative;
      padding: 6px 0;
      &::after {
        content: '';
        position: absolute;
        left: 0;
        bottom: -2px; /* 根据需要调整位置 */
        width: 100%;
        height: 2px; /* 根据需要调整厚度 */
        background: linear-gradient(to right, black, $decorativeColor);
      }
    }
    .content {
      display: flex;
      justify-content: space-between;
      .item {
        padding: 6px 14px;
        width: 440px;
        min-height: 220px;
        color: #ccc;
        background-color: $textColor;
        box-shadow: 2px 2px 4px rgba(0, 0, 0, 1);
        div {
          line-height: 22px;
        }
        .title {
          font-size: 18px;
          margin: 10px 0;
        }
        .desc {
          color: #61686d;
          margin-right: 10px;
        }
      }
    }
  }
}
</style>
